package com.lyr.reflectdemo;

public class Student {
    private int stuId;
    private String stuName;
    private boolean sex;

    public Student() {
    }

    public Student(int stuId, String stuName, boolean sex) {
        this.stuId = stuId;
        this.stuName = stuName;
        this.sex = sex;
    }

    //方法
    public void sayHi(){
        System.out.println("你好");
    }

    public void sayHi(String stuName){
        this.stuName=stuName;
        System.out.println("你好，我是"+this.stuName);
    }

    public int stuNum(){
        System.out.println("返回值");
        return 1;
    }



    public int getStuId() {
        return stuId;
    }

    public void setStuId(int stuId) {
        this.stuId = stuId;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public boolean isSex() {
        return sex;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuId=" + stuId +
                ", stuName='" + stuName + '\'' +
                ", sex=" + sex +
                '}';
    }
}
